package JavaSE.CODE.javaCollection.Generic;

import java.util.ArrayList;
import java.util.ListIterator;

public class GenericCollection {

    public static void main(String[] args) {

        ArrayList<String> objects = new ArrayList<>();
        objects.add("aaa");
        objects.add("bbb");

        for (String object : objects) {
            String s = object;
            System.out.println(s);
        }

        ListIterator<String> listIterator = objects.listIterator();
        while(listIterator.hasNext()){
            String ss = listIterator.next();
            System.out.println(ss);
        }




    }

}
